Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importgeneweb.py broken with Python 3.11 #1622

Merged

Conversation

olivierberten
Copy link
Contributor

No description provided.

@hgohel
Copy link
Member

hgohel commented Jan 6, 2024

@olivierberten Thanks for the PR. What's the behavior without this fix? Do we need to get this into Gramps 5.2? If so we should get a bug and target it for 5.2.

@emyoulation
Copy link
Contributor

Rather than impede progress toward a 5.2 release, perhaps the question is whether this could be done as an add-on? Whether it could supersede the built-in (or the selector for which plug-in is associated with a file extension)?

This question has direct implication for superseding import/export modules that recognize GEDCOM7 (even if all the GEDCOM features are not supported) or vCard that recognized version 2 AND 3 (not just 3).

@olivierberten
Copy link
Contributor Author

@olivierberten Thanks for the PR. What's the behavior without this fix? Do we need to get this into Gramps 5.2? If so we should get a bug and target it for 5.2.

Importing a gw file will fail with

45320: ERROR: dbloader.py: line 569: Failed to import database.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gramps/gui/dbloader.py", line 555, in do_import
    self.import_info = importer(self.dbstate.db, filename,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gramps/plugins/importer/importgeneweb.py", line 151, in importData
    g = GeneWebParser(database,filename)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gramps/plugins/importer/importgeneweb.py", line 173, in __init__
    self.f = open(file, "rUb")
             ^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rUb'

@hgohel
Copy link
Member

hgohel commented Jan 6, 2024

@emyoulation this will be a regression from 5.1.6 if the code ships as-is for 5.2.0 and would need a patch right after release as users run into this. Could we do both, i.e. approve this one character bug fix, and discuss your longer-term thinking in the Development forum?

BTW, there isn't a bug report in the tracker. @olivierberten would you mind creating one? Thanks.

@Nick-Hall Nick-Hall merged commit 0ef37df into gramps-project:maintenance/gramps52 Feb 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants